﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 人事工资管理系统
{
    public partial class frmUserRedeploy : Form
    {
        public frmUserRedeploy()
        {
            InitializeComponent();
        }
        PMSClass.DBOperate operate = new PMSClass.DBOperate();
        public string Uid;
        private void toolStripLabel1_Click(object sender, EventArgs e)
        {
            frmAddUserRedeploy AddUserRedeploy = new frmAddUserRedeploy();
            AddUserRedeploy.ShowDialog();
        }

        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string id = dataGridView1.SelectedCells[0].Value.ToString();
            frmChangeUserRedeploy ChangeUserRedeploy = new frmChangeUserRedeploy();
            ChangeUserRedeploy.Uid = id;
            ChangeUserRedeploy.ShowDialog();
        }

        private void frmUserRedeploy_Load(object sender, EventArgs e)
        {
            string getJFstr = "select UID as '员工编号',UName as '员工姓名',URemoveDate as '调动日期',UOldDep as '原部门',UNewDep as '现部门',UOldJob as '原职务',UNewJob as '现职务',UOldPay as '原工资',UNewPay as '现工资',UPayExplain as '工资说明' from tb_redeploy";
            operate.BindDataGridView(dataGridView1, getJFstr);
        }

        private void toolStripLabel3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            frmChangeUserRedeploy ChangeUserRedeploy = new frmChangeUserRedeploy();
            ChangeUserRedeploy.ShowDialog();
        }
    }
}
